package com.info.zhiduoduo.pay.sdk.dayspaysdk.model.pay.request;

import com.info.zhiduoduo.pay.sdk.dayspaysdk.constant.DaysApiTypeEnum;
import com.info.zhiduoduo.pay.sdk.dayspaysdk.core.util.DateUtil;
import com.info.zhiduoduo.pay.sdk.dayspaysdk.core.util.LocalSeqNo;

import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class QueryMerchantBalanceReqDTO {

	/** 服务代号	N	4	1	1	0300 */
	private String serviceCode; 	
	/** 处理码	N	6	1	1	参考5.1 */
	private String processCode; 	
	/** 版本号	AN	10	0	0	默认1.0.0 */
	private String version; 	
	/** 商户编号	N	15	1	1 */
	private String merchantNo; 	
	/** 请求流水	AN	30	1	1	每笔请求不重复 */
	private String sequenceNo; 	
	/** 报文签名信息	AN	1200	1	0 */
	private String signMsg;

	public static QueryMerchantBalanceReqDTO of() {
		QueryMerchantBalanceReqDTO dto = new QueryMerchantBalanceReqDTO().setServiceCode(DaysApiTypeEnum.QUERY_ACCOUNT_BALANCE.serviceCode)
				.setProcessCode(DaysApiTypeEnum.QUERY_ACCOUNT_BALANCE.processCode)
				.setVersion("1.0.0")
				.setSequenceNo(DateUtil.MMdd(new Date()) + LocalSeqNo.next(8));
		return dto;
	}
}
